<?php if (!defined('THINK_PATH')) exit();?>
<div class="col-md-9 user-manage" style="display:none">
	<div style="width:100%;height:90px;"></div>
	<div class="panel panel-default" style="margin-top:10px;">
		<div class="panel-heading">
		  <h4 class="panel-title">
			<a class="accordion-toggle data-parent="#accordion">员工管理</a>
			<i class="glyphicon glyphicon-plus pull-right add-worker tooltips" data-placement="left" data-toggle="tooltip" data-original-title="添加员工" style="font-size: 25px;"></i>
			<select name="select_department_id" class="pull-right" style="width:30%;margin-right:10px" onchange="searchByDepartment(value,'__APP__/Account/searchByDepartment')">
				<option value="-2">选择部门</option>
				<option value="-1">未审核</option>
				<?php if(is_array($department)): $i = 0; $__LIST__ = $department;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["department_id"]); ?>"><?php echo ($vo["department_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
			</select>
		  </h4>
		</div>
		<div id="collapseOne" class="panel-collapse collapse in users">
		  <div class="panel-body user-list">
			<table class="table table-bordered table-striped table-hover">
				<thead><tr><td>编号</td><td>账号</td><td>姓名</td><td>部门职位</td><td>电话</td><td>操作</td></tr></thead>
				<tbody>
					<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
							<td><?php echo ($vo["uid"]); ?></td>
							<td><?php echo ($vo["account"]); ?></td>
							<td><?php echo ($vo["name"]); ?></td>
							<td><h4><?php if($vo["department_name"] == ''): ?><span class="label label-default">未审核</span><?php else: ?><span class="label label-success"><?php echo ($vo["department_name"]); ?></span><?php endif; ?></h4></td>
							<td><?php echo ($vo["mobile"]); ?></td>
							<td>
								<h4>
									<span class="label label-primary peruser-manage" user-account="<?php echo ($vo["account"]); ?>" user-name="<?php echo ($vo["name"]); ?>" user-uid="<?php echo ($vo["uid"]); ?>">管理</span>
									<span class="label label-danger worker-leave" user-name="<?php echo ($vo["name"]); ?>" user-uid="<?php echo ($vo["uid"]); ?>">删除</span>
								</h4>
							</td>
						</tr><?php endforeach; endif; else: echo "" ;endif; ?>
				</tbody>
			</table>
			<?php echo ($page); ?>
		  </div>
		</div>
	</div>
</div>
<script>$(".tooltips").tooltip();</script>